extends Area2D
export (String,"Player","ENEMY") var group

# 当玩家被创建的信号
signal create_player(player,brith_point)

var PayerTank = preload("res://PayerTank.tscn")
func _ready():
	$Player.playback_speed = 2
	createTank()

func createTank():
	self.visible = true
	$Player.play("create")

func _on_Player_animation_finished(anim_name):
	var tank = PayerTank.instance() as KinematicBody2D
	tank.position = self.position
	tank.add_to_group("tank")
	tank.add_to_group(group)
	self.visible = false
	emit_signal("create_player",tank,self)
